home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / NDK / NDK_3.5 / Include / include_i / devices / printer.i < prev    next >
Encoding:
Text File  |  1999-10-30  |  10.1 KB  |  306 lines

  1.    IFND  DEVICES_PRINTER_I
  2. DEVICES_PRINTER_I EQU    1
  3. **
  4. **    $VER: printer.i 44.1 (19.10.1999)
  5. **    Includes Release 44.1
  6. **
  7. **    printer.device structure definitions
  8. **
  9. **    (C) Copyright 1987-1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. **
  12.  
  13.    IFND  EXEC_TYPES_I
  14.    INCLUDE  "exec/types.i"
  15.    ENDC
  16.  
  17.    IFND  EXEC_NODES_I
  18.    INCLUDE  "exec/nodes.i"
  19.    ENDC
  20.  
  21.    IFND  EXEC_LISTS_I
  22.    INCLUDE  "exec/lists.i"
  23.    ENDC
  24.  
  25.    IFND  EXEC_PORTS_I
  26.    INCLUDE  "exec/ports.i"
  27.    ENDC
  28.  
  29.    IFND  EXEC_IO_I
  30.    INCLUDE  "exec/io.i"
  31.    ENDC
  32.  
  33.    DEVINIT
  34.  
  35. ; V34-V40 commands
  36.    DEVCMD   PRD_RAWWRITE
  37.    DEVCMD   PRD_PRTCOMMAND
  38.    DEVCMD   PRD_DUMPRPORT
  39.    DEVCMD   PRD_QUERY
  40. ; V44 commands
  41.    DEVCMD   PRD_RESETPREFS
  42.    DEVCMD   PRD_LOADPREFS
  43.    DEVCMD   PRD_USEPREFS
  44.    DEVCMD   PRD_SAVEPREFS
  45.    DEVCMD   PRD_READPREFS
  46.    DEVCMD   PRD_WRITEPREFS
  47.    DEVCMD   PRD_EDITPREFS
  48.    DEVCMD   PRD_SETERRHOOK
  49.    DEVCMD   PRD_DUMPRPORTTAGS
  50.  
  51. ;****** printer definitions
  52. aRIS     EQU    0 ; ESCc  reset              ISO
  53. aRIN     EQU    1 ; ESC#1 initialize              +++
  54. aIND     EQU    2 ; ESCD  lf                  ISO
  55. aNEL     EQU    3 ; ESCE  return,lf              ISO
  56. aRI     EQU    4 ; ESCM  reverse lf              ISO
  57.  
  58. aSGR0     EQU    5 ; ESC[0m normal char set          ISO
  59. aSGR3     EQU    6 ; ESC[3m italics on              ISO
  60. aSGR23     EQU    7 ; ESC[23m italics off          ISO
  61. aSGR4     EQU    8 ; ESC[4m underline on          ISO
  62. aSGR24     EQU    9 ; ESC[24m underline off          ISO
  63. aSGR1     EQU   10 ; ESC[1m boldface on              ISO
  64. aSGR22     EQU   11 ; ESC[22m boldface off          ISO
  65. aSFC     EQU   12 ; SGR30-39  set foreground color    ISO
  66. aSBC     EQU   13 ; SGR40-49  set background color    ISO
  67.  
  68. aSHORP0  EQU   14 ; ESC[0w normal pitch          DEC
  69. aSHORP2  EQU   15 ; ESC[2w elite on              DEC
  70. aSHORP1  EQU   16 ; ESC[1w elite off              DEC
  71. aSHORP4  EQU   17 ; ESC[4w condensed fine on          DEC
  72. aSHORP3  EQU   18 ; ESC[3w condensed off          DEC
  73. aSHORP6  EQU   19 ; ESC[6w enlarged on              DEC
  74. aSHORP5  EQU   20 ; ESC[5w enlarged off          DEC
  75.  
  76. aDEN6     EQU   21 ; ESC[6"z shadow print on           DEC (sort of)
  77. aDEN5    EQU   22 ; ESC[5"z shadow print off          DEC
  78. aDEN4     EQU   23 ; ESC[4"z doublestrike on           DEC
  79. aDEN3    EQU   24 ; ESC[3"z doublestrike off          DEC
  80. aDEN2     EQU   25 ; ESC[2"z  NLQ on                   DEC
  81. aDEN1    EQU   26 ; ESC[1"z  NLQ off              DEC
  82.  
  83. aSUS2     EQU   27 ; ESC[2v superscript on          +++
  84. aSUS1     EQU   28 ; ESC[1v superscript off          +++
  85. aSUS4     EQU   29 ; ESC[4v subscript on          +++
  86. aSUS3     EQU   30 ; ESC[3v subscript off          +++
  87. aSUS0     EQU   31 ; ESC[0v normalize the line          +++
  88. aPLU     EQU   32 ; ESCL  partial line up          ISO
  89. aPLD     EQU   33 ; ESCK  partial line down          ISO
  90.  
  91. aFNT0     EQU   34 ; ESC(B US char set         or Typeface  0 (default)
  92. aFNT1     EQU   35 ; ESC(R French char set    or Typeface  1
  93. aFNT2     EQU   36 ; ESC(K German char set    or Typeface  2
  94. aFNT3     EQU   37 ; ESC(A UK char set         or Typeface  3
  95. aFNT4     EQU   38 ; ESC(E Danish I char set  or Typeface  4
  96. aFNT5     EQU   39 ; ESC(H Sweden char set    or Typeface  5
  97. aFNT6     EQU   40 ; ESC(Y Italian char set   or Typeface  6
  98. aFNT7     EQU   41 ; ESC(Z Spanish char set   or Typeface  7
  99. aFNT8     EQU   42 ; ESC(J Japanese char set  or Typeface  8
  100. aFNT9     EQU   43 ; ESC(6 Norweign char set  or Typeface  9
  101. aFNT10     EQU   44 ; ESC(C Danish II char set or Typeface 10
  102.  
  103. ;    Suggested typefaces are:
  104. ;
  105. ;     0 - default typeface.
  106. ;     1 - Line Printer or equiv.
  107. ;     2 - Pica or equiv.
  108. ;     3 - Elite or equiv.
  109. ;     4 - Helvetica or equiv.
  110. ;     5 - Times Roman or equiv.
  111. ;     6 - Gothic or equiv.
  112. ;     7 - Script or equiv.
  113. ;     8 - Prestige or equiv.
  114. ;     9 - Caslon or equiv.
  115. ;    10 - Orator or equiv.
  116. ;
  117.  
  118. aPROP2     EQU   45 ; ESC[2p  proportional on          +++
  119. aPROP1     EQU   46 ; ESC[1p  proportional off          +++
  120. aPROP0     EQU   47 ; ESC[0p  proportional clear          +++
  121. aTSS     EQU   48 ; ESC[n E set proportional offset   ISO
  122. aJFY5     EQU   49 ; ESC[5 F auto left justify          ISO
  123. aJFY7     EQU   50 ; ESC[7 F auto right justiy          ISO
  124. aJFY6     EQU   51 ; ESC[6 F auto full justify          ISO
  125. aJFY0     EQU   52 ; ESC[0 F auto justify off          ISO
  126. aJFY2     EQU   53 ; ESC[2 F  word space(auto center)  ISO (special)
  127. aJFY3     EQU   54 ; ESC[3 F letter space (justify)    ISO (special)
  128.  
  129. aVERP0     EQU   55 ; ESC[0z  1/8" line spacing         +++
  130. aVERP1   EQU   56 ; ESC[1z  1/6" line spacing          +++
  131. aSLPP     EQU   57 ; ESC[nt  set form length n          DEC
  132. aPERF     EQU   58 ; ESC[nq  perf skip n (n>0)          +++
  133. aPERF0     EQU   59 ; ESC[0q  perf skip off          +++
  134.  
  135. aLMS     EQU   60 ; ESC#9  Left margin set          +++
  136. aRMS     EQU   61 ; ESC#0  Right margin set          +++
  137. aTMS     EQU   62 ; ESC#8  Top margin set          +++
  138. aBMS     EQU   63 ; ESC#2  Bottom marg set          +++
  139. aSTBM     EQU   64 ; ESC[Pn1;Pn2r  T&B margins          DEC
  140. aSLRM     EQU   65 ; ESC[Pn1;Pn2s  L&R margin          DEC
  141. aCAM     EQU   66 ; ESC#3  Clear margins          +++
  142.  
  143. aHTS     EQU   67 ; ESCH    Set horiz tab          ISO
  144. aVTS     EQU   68 ; ESCJ    Set vertical tabs          ISO
  145. aTBC0     EQU   69 ; ESC[0g  Clr horiz tab          ISO
  146. aTBC3     EQU   70 ; ESC[3g  Clear all h tab          ISO
  147. aTBC1     EQU   71 ; ESC[1g  Clr vertical tabs          ISO
  148. aTBC4     EQU   72 ; ESC[4g  Clr all v tabs          ISO
  149. aTBCALL  EQU   73 ; ESC#4   Clr all h & v tabs          +++
  150. aTBSALL  EQU   74 ; ESC#5   Set default tabs          +++
  151. aEXTEND  EQU   75 ; ESC[Pn"x extended commands        +++
  152.  
  153. aRAW     EQU   76 ; ESC[Pn"r Next 'Pn' chars are raw  +++
  154.  
  155.  
  156.  STRUCTURE IOPrtCmdReq,IO_SIZE
  157.     UWORD   io_PrtCommand  ; printer command
  158.     UBYTE   io_Parm0    ; first command parameter
  159.     UBYTE   io_Parm1    ; second command parameter
  160.     UBYTE   io_Parm2    ; third command parameter
  161.     UBYTE   io_Parm3    ; fourth command parameter
  162.     LABEL   iopcr_SIZEOF
  163.  
  164.  STRUCTURE  IODRPReq,IO_SIZE
  165.     APTR    io_RastPort    ; raster port
  166.     APTR    io_ColorMap    ; color map
  167.     ULONG   io_Modes       ; graphics viewport modes
  168.     UWORD   io_SrcX       ; source x origin
  169.     UWORD   io_SrcY       ; source y origin
  170.     UWORD   io_SrcWidth    ; source x width
  171.     UWORD   io_SrcHeight   ; source x height
  172.     LONG    io_DestCols    ; destination x width
  173.     LONG    io_DestRows    ; destination y height
  174.     UWORD   io_Special       ; option flags
  175.     LABEL   iodrpr_SIZEOF
  176.  
  177.  STRUCTURE  IODRPTagsReq,IO_SIZE
  178.     APTR    io_RastPort    ; raster port
  179.     APTR    io_ColorMap    ; color map
  180.     ULONG   io_Modes       ; graphics viewport modes
  181.     UWORD   io_SrcX       ; source x origin
  182.     UWORD   io_SrcY       ; source y origin
  183.     UWORD   io_SrcWidth    ; source x width
  184.     UWORD   io_SrcHeight   ; source x height
  185.     LONG    io_DestCols    ; destination x width
  186.     LONG    io_DestRows    ; destination y height
  187.     UWORD   io_Special       ; option flags
  188.     APTR    io_TagList       ; tag list
  189.     LABEL   iodrpr_SIZEOF
  190.  
  191. SPECIAL_MILCOLS        EQU    $0001    ; DestCols specified in 1/1000"
  192. SPECIAL_MILROWS        EQU    $0002    ; DestRows specified in 1/1000"
  193. SPECIAL_FULLCOLS    EQU    $0004    ; make DestCols maximum possible
  194. SPECIAL_FULLROWS    EQU    $0008    ; make DestRows maximum possible
  195. SPECIAL_FRACCOLS    EQU    $0010    ; DestCols is fraction of FULLCOLS
  196. SPECIAL_FRACROWS    EQU    $0020    ; DestRows is fraction of FULLROWS
  197. SPECIAL_CENTER        EQU    $0040    ; center image on paper
  198. SPECIAL_ASPECT        EQU    $0080    ; ensure correct aspect ratio
  199. SPECIAL_DENSITY1    EQU    $0100    ; lowest resolution (dpi)
  200. SPECIAL_DENSITY2    EQU    $0200    ; next res
  201. SPECIAL_DENSITY3    EQU    $0300    ; next res
  202. SPECIAL_DENSITY4    EQU    $0400    ; next res
  203. SPECIAL_DENSITY5    EQU    $0500    ; next res
  204. SPECIAL_DENSITY6    EQU    $0600    ; next res
  205. SPECIAL_DENSITY7    EQU    $0700    ; highest res
  206. SPECIAL_NOFORMFEED    EQU    $0800    ; don't eject paper after gfx prints
  207. SPECIAL_TRUSTME        EQU    $1000    ; don't reset on gfx prints
  208. ;
  209. ;    Compute print size, set 'io_DestCols' and 'io_DestRows' in the calling
  210. ;    program's 'IODRPReq' structure and exit, don't print.  This allows the
  211. ;    calling program to see what the final print size would be in printer
  212. ;    pixels.  Note that it modifies the 'io_DestCols' and 'io_DestRows'
  213. ;    fields of your 'IODRPReq' structure.  Also, set the print density and
  214. ;    update the 'MaxXDots', 'MaxYDots', 'XDotsInch', and 'YDotsInch' fields
  215. ;    of the 'PrinterExtendedData' structure.
  216. ;
  217. SPECIAL_NOPRINT        EQU    $2000    ; see above
  218.  
  219. PDERR_NOERR        EQU    0    ; clean exit, no errors
  220. PDERR_CANCEL        EQU    1    ; user cancelled print
  221. PDERR_NOTGRAPHICS    EQU    2    ; printer cannot output graphics
  222. PDERR_INVERTHAM        EQU    3    ; OBSOLETE
  223. PDERR_BADDIMENSION    EQU    4    ; print dimensions illegal
  224. PDERR_DIMENSIONOVFLOW    EQU    5    ; OBSOLETE
  225. PDERR_INTERNALMEMORY    EQU    6    ; no memory for internal variables
  226. PDERR_BUFFERMEMORY    EQU    7    ; no memory for print buffer
  227. ;
  228. ;    Note : this is an internal error that can be returned from the render
  229. ;    function to the printer device.  It is NEVER returned to the user.
  230. ;    If the printer device sees this error it converts it 'PDERR_NOERR'
  231. ;    and exits gracefully.  Refer to the document on
  232. ;    'How to Write a Graphics Printer Driver' for more info.
  233. ;
  234. PDERR_TOOKCONTROL    EQU    8    ; I took control in case 0 of render
  235.  
  236. PDERR_LASTSTANDARD    EQU    31
  237. PDERR_FIRSTCUSTOM    EQU    32
  238. PDERR_LASTCUSTOM    EQU    126
  239.  
  240. ; internal use
  241. SPECIAL_DENSITYMASK    EQU $0700    ;  masks out density values
  242. SPECIAL_DIMENSIONSMASK    EQU SPECIAL_MILCOLS!SPECIAL_MILROWS!SPECIAL_FULLCOLS!SPECIAL_FULLROWS!SPECIAL_FRACCOLS!SPECIAL_FRACROWS!SPECIAL_ASPECT
  243.  
  244.  
  245. ;    Tags for IODRPTagsReq
  246. DRPA_Dummy        EQU    TAG_USER + $60000
  247.  
  248. DRPA_ICCProfile        EQU    DRPA_Dummy + 1 ; RESERVED
  249. DRPA_ICCName        EQU    DRPA_Dummy + 2 ; RESERVED
  250. DRPA_NoColCorrect    EQU    DRPA_Dummy + 3 ; RESERVED
  251.  
  252. ;    Source Hook
  253. DRPA_SourceHook        EQU    DRPA_Dummy + 4
  254.  
  255.   STRUCTURE DRPSourceMsg,0
  256.     LONG drpsm_X
  257.     LONG drpsm_Y
  258.     LONG drpsm_Width
  259.     LONG drpsm_Height
  260.     APTR drpsm_Buf
  261.     LABEL drpsm_SIZEOF
  262.  
  263. ;    Source aspect
  264. DRPA_AspectX        EQU    DRPA_Dummy + 5
  265. DRPA_AspectY        EQU    DRPA_Dummy + 6
  266.  
  267. ;    Tags for IOPrtPrefsReq
  268. PPRA_Dummy        EQU    TAG_USER + $70000
  269.  
  270.   STRUCTURE IOPrtPrefsReq,IO_SIZE
  271.     APTR ioppr_TagList
  272.     LABEL ioppr_SIZEOF
  273.  
  274. PPRA_Window        EQU    PPRA_Dummy + 1
  275. PPRA_Screen        EQU    PPRA_Dummy + 2
  276. PPRA_PubScreen        EQU    PPRA_Dummy + 3
  277.  
  278. ;    IOPrtErrReq
  279. PDHOOK_NONE        EQU 0
  280. PDHOOK_STD        EQU 1
  281.  
  282.   STRUCTURE IOPrtErrReq,IO_SIZE
  283.     APTR ioper_Hook
  284.     LABEL ioper_SIZEOF
  285.  
  286.   STRUCTURE PrtErrMsg,0
  287.     ULONG pem_Version
  288.     ULONG pem_ErrorLevel
  289.     APTR pem_Window
  290.     APTR pem_ES
  291.     APTR pem_IDCMP
  292.     APTR pem_ArgList
  293.     LABEL pem_SIZEOF
  294.  
  295. PDHOOK_VERSION EQU 1
  296.  
  297. ;    PRIVATE: change preferences temporary.
  298.   STRUCTURE IOPrefsReq,IO_SIZE
  299.     APTR iopr_TxtPrefs
  300.     APTR iopr_UnitPrefs
  301.     APTR iopr_DevUnitPrefs
  302.     APTR iopr_GfxPrefs
  303.     LABEL iopr_SIZEOF
  304.  
  305.    ENDC
  306.